#ifndef QUEST_0_1_LEXER_H
#define QUEST_0_1_LEXER_H

#include "meta.h"
#include "scanner.h"

class Lexer {
public:
    FILE* file; //源文件
    Scanner& scanner; //扫描器
    char ch; //读取的字符
    Token *fetch();//读取到一个词法标记

    string lineInfo();
    Lexer(Scanner &scanner);
    ~ Lexer();
private:
    Token *fetchId();
    Token *fetchNum();
    Token *fetchStr();
    Token *fetchMark();
    Token *fetchStruct();
};


#endif //QUEST_0_1_LEXER_H
